<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数组</title>
</head>
<body>
<h1 style="color:#0ff">数组</h1>
<script type="text/javascript">
    var arr=[1,2,'abc',true,undefined,null];
    console.log(arr);
    console.log(arr[0]);
    console.log(arr[1]);
    console.log(arr[5]);
    arr[0]=100;
    console.log(arr);
    arr[6]=6;
    console.log(arr);
    arr[8]=8;
    console.log(arr);
    console.log(arr[7]);
    arr[18]='a';
    console.log(arr);
    arr.length = 2;
    console.log(arr);
</script>
</body>
</html>